#ifndef HTTP_H
#define HTTP_H

#include <QObject>
#include <QRunnable>
#include <QUrl>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QEventLoop>
#include <QFile>

class http : public QObject,public QRunnable
{
    Q_OBJECT
public:
    explicit http(const QUrl& url,const QString& path,QObject *parent = nullptr);

    virtual void run();
signals:
    void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
    void finished();
private:
    QUrl m_url;
    QString m_path;

};

#endif // HTTP_H
